package cn.doitedu.spring_boot.mapper;

import cn.doitedu.spring_boot.beans.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Date 22.3.24
 * @Created by HANGGE
 * @Description
 */
@Mapper
public interface UserMapper {
    @Insert("insert into  tb_account (uid , account , password) values(null , #{account} , #{password})")
    public  void  addUser(User user);

    @Select("select * from tb_account where  account = '${value}'")
    public User  getUserByAccount(String  account) ;

    @Select("select * from tb_account")
    public List<User> getAllUser() ;

}
